package com.wuba.rxjavademo.lyz.day0505;

import com.wuba.rxjavademo.lyz.BaseDemo;

import rx.Observable;
import rx.subjects.AsyncSubject;

/**
 * Created by liyaxing on 2016/5/6.
 */
public class Demo02 extends BaseDemo{

    public static void main(String[] ss){

//        PublishSubject<String> integerPublishSubject = PublishSubject.create() ;
        AsyncSubject<String> stringBehaviorSubject = AsyncSubject.create() ;


        Observable.just("R","x","J","a","v","a")
                .subscribe(stringBehaviorSubject) ;
//        stringBehaviorSubject.onNext("test");
//        stringBehaviorSubject.onCompleted();
        stringBehaviorSubject.subscribe(s -> print(s)) ;
        stringBehaviorSubject.onNext("last");



        try {
            Thread.sleep(1000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }

//    public static

    public static void fasdio(String s){

    }
}
